import 'package:flutter/material.dart';

void main() {
  runApp(const MyApp());
}

class MyApp extends StatelessWidget {
  const MyApp({super.key});

  @override
  Widget build(BuildContext context) {
    final _clearDimensionLabel = [
      '身高',
      '体重',
      '领围',
      '胸围',
      '中腰',
      '肩宽',
      '袖长',
      '腰围',
      '臀围',
      '裤长',
    ];

    return MaterialApp(
      title: 'Flutter Demo',
      theme: ThemeData(
        colorScheme: ColorScheme.fromSeed(seedColor: Colors.deepPurple),
        useMaterial3: true,
      ),
      home: Scaffold(
        appBar: AppBar(title: const Text('GridView')),
        body: Center(
          child: Container(
            decoration: const BoxDecoration(color: Colors.lightBlue),
            height: 150,
            child: GridView.builder(
              physics: const NeverScrollableScrollPhysics(),
              shrinkWrap: true,
              gridDelegate: const SliverGridDelegateWithFixedCrossAxisCount(
                crossAxisCount: 4,
                crossAxisSpacing: 20.0,
                childAspectRatio: 4.5,
              ),
              itemBuilder: (context, index) => TextField(
                decoration: InputDecoration(labelText: _clearDimensionLabel[index]),
                keyboardType: TextInputType.number,
              ),
              itemCount: 6,
            ),
          ),
        ),
      ),
    );
  }
}
